<!--
  
   RaceEditor.xaml
  
   Copyright (c) 2007 Mike Strobel
  
   This source code is subject to the terms of the Microsoft Reciprocal License (Ms-RL).
   For details, see <http://www.opensource.org/licenses/ms-rl.html>.
  
   All other rights reserved.
  
  -->
<local:EditorBase x:Class="Supremacy.Editor.RaceEditor"
                  xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
                  xmlns:s="clr-namespace:Supremacy.Client;assembly=SupremacyWPF"
                  xmlns:local="clr-namespace:Supremacy.Editor"
                  xmlns:tech="clr-namespace:Supremacy.Tech;assembly=SupremacyCore"
                  xmlns:buildings="clr-namespace:Supremacy.Buildings;assembly=SupremacyCore"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <Grid Margin="12">
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto"
                        SharedSizeGroup="EditorLeftColumnGroup" />
      <ColumnDefinition Width="*"/>
      <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <Label Grid.Column="0"
           Grid.Row="0"
           Margin="0,3,2,3"
           Target="{Binding ElementName=IdentityText}"
           Content="Identity:"
           FontWeight="Bold"/>
    <TextBox x:Name="IdentityText"
             Grid.Column="1"
             Grid.Row="0"
             Margin="2,3,2,3"
             MinWidth="128"
             MaxWidth="256"
             HorizontalAlignment="Left"
             CharacterCasing="Upper">
      <TextBox.Text>
        <Binding Path="Key"
                 Mode="TwoWay">
          <Binding.ValidationRules>
            <local:NonEmptyValidationRule/>
          </Binding.ValidationRules>
        </Binding>
      </TextBox.Text>
    </TextBox>
    
    <Label Grid.Column="0"
           Grid.Row="1"
           Margin="0,3,2,3"
           Target="{Binding ElementName=SingularNameText}"
           Content="Singular Name:"
           FontWeight="Bold"/>
    <TextBox Name="SingularNameText"
             Grid.Column="1"
             Grid.Row="1"
             Margin="2,3,2,3"
             MinWidth="128"
             MaxWidth="256"
             HorizontalAlignment="Left">
      <TextBox.Text>
        <Binding Path="SingularName"
                 Mode="TwoWay">
          <Binding.ValidationRules>
            <local:NonEmptyValidationRule/>
          </Binding.ValidationRules>
        </Binding>
      </TextBox.Text>
    </TextBox>
    
    <Label Grid.Column="0"
           Grid.Row="2"
           Margin="0,3,2,3"
           Target="{Binding ElementName=PluralNameText}"
           Content="Plural Name:"
           FontWeight="Bold"/>
    <TextBox Name="PluralNameText"
             Grid.Column="1"
             Grid.Row="2"
             Margin="2,3,2,3"
             MinWidth="128"
             MaxWidth="512"
             HorizontalAlignment="Left">
      <TextBox.Text>
        <Binding Path="PluralName"
                 Mode="TwoWay">
          <Binding.ValidationRules>
            <local:NonEmptyValidationRule/>
          </Binding.ValidationRules>
        </Binding>
      </TextBox.Text>
    </TextBox>
    
    <Label Grid.Column="0"
           Grid.Row="3"
           Margin="0,3,2,3"
           Target="{Binding ElementName=DescriptionText}"
           Content="Description:"
           FontWeight="Bold"/>
    <TextBox Name="DescriptionText"
             Grid.Column="1"
             Grid.Row="3"
             Height="128"
             Margin="2,3,2,3"
             TextWrapping="Wrap"
             VerticalScrollBarVisibility="Visible"
             AcceptsReturn="True"
             Text="{Binding Path=Description, Mode=TwoWay}"/>
    
    <Label Grid.Column="0"
           Grid.Row="4"
           Margin="0,3,2,3"
           Target="{Binding ElementName=HomePlanetTypeList}"
           Content="Homeworld Type:"
           FontWeight="Bold"/>
    <ComboBox Name="HomePlanetTypeList"
              Grid.Column="1"
              Grid.Row="4"
              Margin="2,3,2,3"
              MinWidth="128"
              HorizontalAlignment="Left"
              SelectedItem="{Binding Path=HomePlanetType, Mode=TwoWay}"/>
    
  </Grid>

</local:EditorBase>